#ifndef GROUPINFOTAB_H
#define GROUPINFOTAB_H

#include <QWidget>
#include<QTabWidget>
#include<QVBoxLayout>
#include <QtGui>
#include <QAction>
#include"clientcenter.h"
#include "clientgroupcenter.h"
#include"clientbriefinfopanel.h"
#include"datacenter.h"
#include "clientgroup.h"
#include "groupwizard.h"
#include "editgroupinfodialog.h"
#include <boost/shared_ptr.hpp>

class DataCenter;
class ClientCenter;
class ClientGroupCenter;
class ClientBriefInfoPanel;

namespace Ui {
    class GroupInfoTab;
}

class GroupInfoTab : public QWidget {
    Q_OBJECT
public:
    GroupInfoTab(QWidget *parent = 0);
    ~GroupInfoTab();

protected:
    void changeEvent(QEvent *e);

private:
    Ui::GroupInfoTab *ui;
	QVBoxLayout* m_MainLayout;
	QTabWidget* m_GroupMemberTab;
	QAction* m_AddGroupAction;
	QAction* m_EditGroupAction;
	QWidget* m_AddGroupWidget;
	boost::shared_ptr<ClientCenter> m_ClientCenter;
	boost::shared_ptr<ClientGroupCenter> m_ClientGroupCenter;
	QMap<int, ClientBriefInfoPanel* > m_ClientBriefInfoPanelList;

private:
	void setupWidget();

private slots:
	void updateGroupList(int opType, int opId);
	void updateAllGroupName();
	void currentTabChanged(int index);
	void onRejected();
//	void createGroup();
};

#endif // GROUPINFOTAB_H
